package com.jmy.service.impl;

import com.jmy.mapper.RolesMapper;
import com.jmy.pojo.Roles;
import com.jmy.service.RolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author: VE
 * @DATE: 2022/9/27 14:17
 * 描述:
 */
@Service
public class RolesServiceImpl implements RolesService {

    @Autowired
    private RolesMapper rolesMapper;
    @Transactional(propagation = Propagation.REQUIRED)
    @Override
    public Object insert(Roles roles) {
        return null;
    }
    @Transactional(propagation = Propagation.REQUIRED)
    @Override
    public Object delete(int id) {
        return null;
    }
    @Transactional(propagation = Propagation.REQUIRED)
    @Override
    public Object update(Roles roles) {
        return null;
    }
    @Transactional(readOnly = true)
    @Override
    public Roles load(int id) {
        return null;
    }

    @Transactional(readOnly = true)
    @Override
    public List<Roles> getRolesListByAid(Integer aId) {
        return rolesMapper.getRolesListByAid(aId);
    }
    @Transactional(readOnly = true)
    @Override
    public List<Roles> getRolesList() {
        return rolesMapper.getRolesList();
    }
}
